﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace T.FAS.Runtime.Metadata.Entity.Page
{
    public class ValueInfo
    {
        public ValueInfo()
        {

        }
        public ValueInfo(string pageTermCode, PageUIControl control,string showValue,string prop)
        {
            Type = 1;
            ReferenceExpr = $"Schema.Page.{pageTermCode}.Controls.{control.InstanceCode}.{prop}";
            ShowValue = showValue;
        }
        public ValueInfo(object showValue,string referenceExpr,int type = 0)
        {
            ShowValue = showValue;
            ReferenceExpr = referenceExpr;
            Type = type;
        }
        /// <summary>
        /// 显示值
        /// </summary>
        public object ShowValue { get; set; }
        /// <summary>
        /// 引用表达式
        /// </summary>
        public string ReferenceExpr { get; set; }
        /// <summary>
        /// 类型
        /// </summary>
        public int Type { get; set; }
    }
}
